Int
Represents a 32-bit signed integer. On the JVM, non-nullable values of this type are represented as values of the primitive type int
.
Types
Functions
Compares this value with the specified value for order. Returns zero if this value is equal to the specified other value, a negative number if it's less than other, or a positive number if it's greater than other.
Divides this value by the other value, truncating the result to an integer that is closer to zero.
Divides this value by the other value.
Subtracts the other value from this value.
Adds the other value to this value.
Calculates the remainder of truncating division of this value by the other value.
Since Kotlin
Multiplies this value by the other value.
Returns the negative of this value.
Extensions
Returns the absolute value of this value.
Returns the absolute value of this value.
Returns the absolute value of this value.
Returns the absolute value of this value.
Ensures that this value is not less than the specified minimumValue.
Ensures that this value is not greater than the specified maximumValue.
Ensures that this value lies in the specified range minimumValue..maximumValue.
Ensures that this value lies in the specified range.
Counts the number of consecutive most significant bits that are zero in the binary representation of this Int number.
Counts the number of consecutive most significant bits that are zero in the binary representation of this Int number.
Counts the number of consecutive most significant bits that are zero in the binary representation of this Int number.
Counts the number of consecutive most significant bits that are zero in the binary representation of this Int number.
Counts the number of set bits in the binary representation of this Int number.
Counts the number of set bits in the binary representation of this Int number.
Counts the number of set bits in the binary representation of this Int number.
Counts the number of set bits in the binary representation of this Int number.
Counts the number of consecutive least significant bits that are zero in the binary representation of this Int number.
Counts the number of consecutive least significant bits that are zero in the binary representation of this Int number.
Counts the number of consecutive least significant bits that are zero in the binary representation of this Int number.
Counts the number of consecutive least significant bits that are zero in the binary representation of this Int number.
Returns the Char that represents this decimal digit. Throws an exception if this value is not in the range 0..9
.
Divides this value by the other value, flooring the result to an integer that is closer to negative infinity.
Calculates the remainder of flooring division of this value by the other value.
Returns a number having a single bit set in the position of the most significant set bit of this Int number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the most significant set bit of this Int number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the most significant set bit of this Int number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the most significant set bit of this Int number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the least significant set bit of this Int number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the least significant set bit of this Int number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the least significant set bit of this Int number, or zero, if this number is zero.
Returns a number having a single bit set in the position of the least significant set bit of this Int number, or zero, if this number is zero.
Returns the value of this Int number as a BigDecimal.
Returns the value of this Int number as a BigInteger.